import java.util.Scanner;

public class Test1 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        for(int i = 0; i < n; i++) {
            int tmp = scanner.nextInt();
            int count = 0;
            while(tmp > 1) {
                tmp = tmp >> 1;
                count++;
            }
            System.out.println(count);
        }
    }
}
